USE [@DATABASE]

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ZimmetHDetay_isDeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ZimmetHDetay] DROP CONSTRAINT [DF_ZimmetHDetay_isDeleted]
END

USE [@DATABASE]

/****** Object:  Table [dbo].[ZimmetHDetay]    Script Date: 02/11/2013 21:32:39 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZimmetHDetay]') AND type in (N'U'))
DROP TABLE [dbo].[ZimmetHDetay]

USE [@DATABASE]

/****** Object:  Table [dbo].[ZimmetHDetay]    Script Date: 02/11/2013 21:32:39 ******/
SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[ZimmetHDetay](
	[zdID] [int] IDENTITY(1,1) NOT NULL,
	[zID] [int] NULL,
	[UrunID] [int] NULL,
	[UrunTipi] [int] NULL,
	[Aciklama] [nvarchar](max) NULL,
	[isDeleted] [bit] NULL,
	[extender] [nvarchar](1) NULL,
 CONSTRAINT [PK_ZimmetHDetay] PRIMARY KEY CLUSTERED 
(
	[zdID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


ALTER TABLE [dbo].[ZimmetHDetay] ADD  CONSTRAINT [DF_ZimmetHDetay_isDeleted]  DEFAULT ((0)) FOR [isDeleted]